package com.yeh.service.impl;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.yeh.dao.BaseDao;
import com.yeh.service.BaseService;

public abstract class BaseSerivceImpl<M extends Serializable,K extends Serializable> implements BaseService<M, K> {
	 
	@Autowired
	protected BaseDao<M,K> baseDao;
	
	public BaseDao<M,K> getBaseDao(){
		return baseDao;
	}

	@Override
	public K save(M model) {
		return baseDao.save(model);
	}


	@Override
	public void update(M model) {
		baseDao.update(model);
	}


	@Override
	public void delete(K id) {
		baseDao.delete(id);
	}

	@Override
	public M get(K id) {
		return baseDao.get(id);
	}
	
	@Override
	public List<M> getList() {
		return baseDao.getList();
	}
	
}
